<div>
  <h1>
    申请加盟管理
  </h1>
</div>

<div>
  <table class="table table-striped">
    <tr>
      <th>编号</th>
      <th>姓名</th>
      <th>电话</th>
      <th>地址</th>
      <th>操作</th>
    </tr>

    <% @join_records.each do |join_record| %>
      <tr>
        <td><%= join_record.id %></td>
        <td><%= join_record.name %></td>
        <td><%= join_record.mobile %></td>
        <td><%= join_record.address %></td>
        <td>
          <%= link_to "查看详情", admin_join_record_path(join_record) %>
          &nbsp;&nbsp;
          |
          &nbsp;&nbsp;
          <%= link_to join_record.state ? '打开' : '关闭', change_state_admin_join_record_path(join_record) %>
        </td>
      </tr>
    <% end -%>
  </table>

  <%= will_paginate @join_records %>
</div>
